<!-- 文章管理 -->
<div class="easyui-layout" data-options="fit:true,border:false">
    <div id="accountTab" class="easyui-tabs" data-options="fit:true,border:false" style="border-top:1px solid #CCC;">
    <div title="用户服务协议">
        <div class="easyui-layout" data-options="fit:true,border:false">
            <div data-options="region:'north',border:false,height:'auto'" >
                <div class="searchIndex">
                    <ul >
                        <li>
                            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-filesavewin8',plain:true" onClick="$('#addIssueDialog').dialog('open');">保存</a>
                        </li>
                    </ul>
                </div>
            </div>
            <div data-options="region:'center',border:false" >
                <textarea id="agreementContainer" style="width:100%;height:380px;"></textarea>
            </div>
        </div>
    </div>
    <div title="关于我们">
        内容未知？？？
    </div>
    <div title="常见问题管理">
        <div class="easyui-layout" data-options="fit:true,border:false">
            <div data-options="region:'north',border:false,height:'auto'" >
                <div class="searchIndex">
                    <ul >
                        <li>
                            <label>关键字:</label>
                            <input class="base-input" name="orderNo" />
                        </li>
                        <li>
                            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-searchWin8',plain:true">查询</a>
                        </li>
                    </ul>
                </div>
            </div>
            <div data-options="region:'center',border:false" >
                <div id="indexButton" style="padding-left:10px;">
                    <a href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true" onClick="$('#addIssueDialog').dialog('open');">新建常见问题</a>
                </div>
                <table id="addOrderItem" class="easyui-datagrid" data-options="url:'../../json/replyEdit.asp',toolbar:'#indexButton',rownumbers:true,border:false,fit:true,fitColumns:true,nowrap:false,height:350">
                    <thead>
                        <tr>
                            <th data-options="field:'orderNo',width:80,align:'center'">序号</th>
                            <th data-options="field:'title',width:80,align:'center'">标题</th>
                            <th data-options="field:'content',width:80,align:'center'">正文内容</th>
                            <th data-options="field:'11',width:80,align:'center',formatter:PageObject.gameUserFormatter">操作</th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>
    
</div>

<!-- 新建常见问题 -->
<div id="addIssueDialog" class="easyui-dialog" data-options="title:'新建常见问题',closable:true,closed:true,modal:true,width:950,height:550,buttons:'#addIssueDialogBtn'">
    <div class="con_form">
        <ul >
            <li>
                <label>序号:</label>
                <input type="text" class="base-input" style="width:350px;" />
                <span>（注：序号大小决定客户端显示的先后顺序，序号越小，显示的位置越前）</span>
            </li>
            <li>
                <label>标题:</label>
                <input type="text" class="base-input" style="width:750px;" />
            </li>
            <li>
                <label>正文:</label>
                <textarea id="container" style="width:98%;height:400px;"></textarea>
            </li>
        </ul>
    </div>

    <div id="addIssueDialogBtn">
        <center>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-filesavewin8'" onClick="$.messager.alert('提示','保存成功！','info');">保存</a>
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-closeWin8'" onClick="$('#addIssueDialog').dialog('close')">关闭</a>
        </center>
    </div>
</div>

<script>
    ;(function($,window, PageObject){

        // 页面初始化
        PageObject.init = function(){

            // 初始化编辑器
            var editor = new UE.ui.Editor();
            editor.render("container");
            
            // 初始化编辑器
            var agreementEditor = new UE.ui.Editor();
            agreementEditor.render("agreementContainer");
        };

        // 格式化datagrid(修改最后一列数据为详情)
        PageObject.gameUserFormatter = function (value, row, rowIndex) {
            // 原型中为删除和详情 但没有详情页面，故改为编辑更为合适
            return "<a href='javascript:void(0);' style='color:blue;' onclick='$(\"#addIssueDialog\").dialog(\"open\");'>编辑</a><a href='javascript:void(0);' style='color:blue;margin-left:10px;' onclick='PageObject.gameUserDetail();'>删除</a><a href='javascript:void(0);' style='color:blue;margin-left:10px;' onclick='PageObject.gameUserDetail();'>详情</a>";
        };

        PageObject.init();

    })(jQuery,window, window.PageObject = {});

</script>